package app.services.impl;

import java.util.List;

import app.models.Fornecedor;
import app.repositories.FornecedorRepository;
import app.repositories.Repository;
import app.services.FornecedorService;
import br.com.caelum.vraptor.ioc.Component;

@Component
public class FornecedorServiceImpl extends GenericServiceImpl<Fornecedor, Long> implements FornecedorService {

	private final FornecedorRepository repository;
	
	public FornecedorServiceImpl (FornecedorRepository repository){
		this.repository = repository;
		super.setGenericRepository((Repository<Fornecedor, Long>) repository);
	}
	
	public List<Fornecedor> findLastFornecedores() {
		return repository.findLastFornecedores();
	}
	
}
